import RPi.GPIO as gpio
import time
from musics import huan_le_song, shi_shang_zhi_you_ma_ma_hao as mmh

pin = (11,12)

gpio.setwarnings(False)
gpio.setmode(gpio.BOARD)
gpio.setup(pin, gpio.OUT)


p = gpio.PWM(11, 1)
p.start(50)
for note in mmh:
    print(note)
    p.ChangeFrequency(note[0])
    time.sleep(1.5*note[1])
#input('Press Enter to Stop:')
p.stop()
gpio.cleanup()
